package com.yht.weblog.common.exception;

import lombok.Data;

/**
 * @author: yht
 * @date: 2023/11/24 22:04
 * @description: 自定义业务异常
 **/
@Data
public class BizException extends RuntimeException {
    // 异常码
    private String errorCode;

    // 错误信息
    private String errorMessage;

    public BizException(BaseExceptionInterface baseExceptionInterface){
        this.errorCode = baseExceptionInterface.getErrorCode();
        this.errorMessage = baseExceptionInterface.getErrorMessage();
    }

}
